package net.expectx.pay.merchant.common.util;

import com.alibaba.fastjson.JSONObject;
import net.expectx.common.single.util.AesUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lijian
 */
public class ExpectXUtil {
    /**
     * 过滤语言
     * @param content
     * @param lanuage
     * @return
     */
    public static String filterLanguage(String content,String lanuage){

        try {
            JSONObject json=JSONObject.parseObject(content);
            return json.getString(lanuage);
        }catch (Exception e){
            return content;
        }
    }

    public static List<Long> toList(String val, String split){
        List<Long> longs=new ArrayList<>();
        String [] v=val.split(split);
        for (String s:v){
            longs.add(Long.valueOf(s));
        }
        return longs;
    }
    public static void main(String [] args){
        System.out.println(AesUtil.aesEncode("Yingpaikeji2018!"));
    }
}
